/**
 * This program is free software but WITHOUT ANY WARRANTY OR CONDITIONS OF ANY KIND.
 *
 * Copyright (C) 2008 www.pretty-tools.com
 */

window.arguments = new Array();

function addArgument(arg)
{
    if (arg && typeof arg == 'object')
    {
        // clone array
        if (typeof arg.push != 'undefined' && typeof arg.concat != 'undefined')
        {
            var clone = new Array();
            for (var i = 0; i < arg.length; ++i)
                clone.push(arg[i]);
            arg = clone;
        }
    }

    window.arguments.push(arg);
}